import java.util.ArrayList;
import java.util.List;

public class Main{
    public static void main(String[] args) {
        NQueens nQueens = new NQueens();
        int n = 4; // 可以将其更改为任何其他值
        List<List<String>> solutions = nQueens.solveNQueens(n);
        for (List<String> solution : solutions) {
            for (String row : solution) {
                System.out.println(row);
            }
            System.out.println();
        }
    }
}